nginx HTTP load balancer

Back to Production-Engineering/NGINX

Load balancing across multiple application instances optimizes resource utilization

Methods

Default Config

http {
    upstream myapp1 {
        server srv1.example.com;
        server srv2.example.com;
        server srv3.example.com;
    }

    server {
        listen 80;

        location / {
            proxy_pass http://myapp1;
        }
    }
}

Health checks

Reverse proxy implementation in nginx includes in-band server health checks